﻿using scripts.net;

namespace scripts.proto
{
    //玩家操控角色位置等信息
    [System.Serializable]
    public class CharacterInfo
    {
        public string id = ""; //玩家id
        public int camp = 0; //阵营
        public float hp = 0; //生命值
        public float armor = 0; //护甲

        public float x = 0; //位置
        public float y = 0;
        public float z = 0;
        public float ex = 0; //旋转
        public float ey = 0;
        public float ez = 0;
    }


    //进入战场（服务端推送）
    public class EnterBattleMsg : BaseMsg
    {
        public EnterBattleMsg()
        {
            protoName = "EnterBattleMsg";
        }

        //服务端回
        public CharacterInfo[] characters;
        public int mapId = 1; //地图，TODO 目前只有一张
    }

    //战斗结果（服务端推送）
    public class BattleResultMsg : BaseMsg
    {
        public BattleResultMsg()
        {
            protoName = "BattleResultMsg";
        }

        //服务端回
        public int winCamp = 0; //获胜的阵营
    }

    //玩家退出（服务端推送）
    public class LeaveBattleMsg : BaseMsg
    {
        public LeaveBattleMsg()
        {
            protoName = "LeaveBattleMsg";
        }

        //服务端回
        public string id = ""; //玩家id
    }
}